package com.iter.devbox.pattern.chain;

/**责任链模式--客户端调用*/
public class Client {
	public static void main(String[] args) {
		Request request = new Request();
		request.setReqStr("request");

		Response response = new Response();
		response.setRespStr("response");

		Filter encodeFilter = new EncodeFilter();
		Filter loginFilter = new LoginFilter();

		FilterChain chain = new FilterChain(request, response);
		chain.addFilter(encodeFilter);
		chain.addFilter(loginFilter);

		chain.doFilter(request, response);
	}
}